home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / programm.ing / gfa / gfacode.arc / GETBPB.LST < prev    next >
Encoding:
File List  |  1990-11-14  |  698 b   |  25 lines

  1. '  Getting drive info from the
  2. '  BIOS PARAMETER BLOCK!!!
  3. '
  4. ' drive% is the drive you want to
  5. ' check (0-A:, 1-B:)
  6. @getbpb(0)
  7. END
  8. '
  9. PROCEDURE getbpb(drive%)
  10.   bpb%=BIOS(7,drive%)
  11.   PRINT "PBP located at: ";bpb%
  12.   PRINT "sector size in bytes: ";INT{bpb%}
  13.   PRINT "cluster size in sectors: ";INT{bpb%+2}
  14.   PRINT "cluster size in bytes: ";INT{bpb%+4}
  15.   PRINT "# of directory sectors: ";INT{bpb%+6}
  16.   PRINT "FAT size in sectors: ";INT{bpb%+8}
  17.   PRINT "start sector of 2nd FAT: ";INT{bpb%+10}
  18.   PRINT "first data sector: ";INT{bpb%+12}
  19.   PRINT "# of data clusters: ";INT{bpb%+14}
  20.   PRINT "FAT entry size: ";INT{bpb%+16}
  21.   PRINT
  22.   PRINT "Press a key to continue"
  23.   ~INP(2)
  24. RETURN
  25.